#include <REGX52.H>
#include "Delay.h"


void Delay(unsigned int t)		//@11.0592MHz
{
	while (t--);
}


sbit LED = P2^0;


void main()
{
	unsigned char Time = 0;
	unsigned char i = 0;
	while(1)
	{

		
		for (Time = 0;Time < 100;Time++)
		{
			for (i = 0;i < 20;i++)
			{
				LED = 0;
				Delay(100 - Time);
				LED = 1;
				Delay(Time);
			}
		}
	
		for (Time = 100;Time > 0;Time--)
		{
			for (i = 0;i < 20;i++)
			{
				LED = 0;
				Delay(100 - Time);
				LED = 1;
				Delay(Time);
			}
		}

		
	}
}










